package com.anc.admin.demo;

import lombok.Data;

import java.util.ArrayList;
import java.util.UUID;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.Executor;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

public class threadTrans {
    public static void main(String[] args) {
        System.out.println("111");
        System.out.println("222");
        System.out.println("333");
        System.out.println("4444");
        String taskId= UUID.randomUUID().toString();
        ArrayList list=new ArrayList();
        //init(500000,taskId);
        //声明一个主线程CountDownLatch通知
        int threadCount=5;
        CountDownLatch childMonitor=new CountDownLatch(threadCount);
        ExecutorService executor= Executors.newCachedThreadPool();
        Task task=new Task(taskId,"任务名称",System.currentTimeMillis(),1);
    }
    @Data
    static class Task{
        private String taskId;
        private  String taskName;
        private Long time;
        private Integer status;

        public Task(String taskId, String taskName, Long time, Integer status) {
            this.taskId = taskId;
            this.taskName = taskName;
            this.time = time;
            this.status = status;
        }
    }
}
